home *** CD-ROM | disk | FTP | other *** search
- global oASRObj, gMainLangModel, gCallBack, gSelectorLangModel, gTempLangModel, gMainLexSize, gMainLex, gMACListenStatus, gTempLexSize, gTempLexicon, gInputField, gdescfield, gIndxScrollFldK, gComputerTypeK, gVideoButtspr, gSelectorLex, gSelectorLexSize, gHuhCount, gESstartSND, oTextScroller, oIndexScroller, oINTERfaceFind, gPrevCommand, gBtnHitSND, gQTflag, gModeState, gTrekCursor, gSpeeButtSpr, gSpeeButtCastList, gWINListenStatus, gWinVoiceEnabled, gAudioButtspr, gWINvoiUserPermit, gSpeechCapable, gTempHyperlinks, gHoldSearchInfo, gResrcButtspr, oTextSlider
-
- on hPrepTempLang pLM, pSize, pList
- cursor(4)
- set Lerrmsg to 0
- set tidl to the itemDelimiter
- set the itemDelimiter to "@"
- if not voidp(gTempHyperlinks) then
- set LitmCnt to the number of items in gTempHyperlinks
- else
- return
- end if
- if LitmCnt = 1 then
- set LitmCnt to 0
- end if
- repeat with i = 1 to pSize
- set Lerrmsg to oASRObj(mAddPhrase, pLM, getAt(pList, i), i + LitmCnt)
- if Lerrmsg then
- exit repeat
- end if
- put getAt(pList, i) after item i + LitmCnt of gTempHyperlinks
- end repeat
- set the itemDelimiter to tidl
- cursor([gTrekCursor, gTrekCursor + 1])
- if Lerrmsg then
- end if
- end
-
- on hAppendLexiconfromList pTheList
- if not objectp(pTheList) then
- return
- end if
- set Lcnt to count(pTheList)
- repeat with i = 1 to Lcnt
- add(gTempLexicon, getPropAt(pTheList, i))
- end repeat
- end
-
- on hAppendLexicon W1, wLast
- set Lchunk to word W1 to wLast of field gdescfield
- if Lchunk contains ";" then
- set Ltidl to the itemDelimiter
- set the itemDelimiter to ";"
- set Lsz to the number of items in Lchunk
- repeat with i = 1 to Lsz
- add(gTempLexicon, item i of Lchunk)
- end repeat
- set the itemDelimiter to Ltidl
- else
- add(gTempLexicon, Lchunk)
- end if
- end
-
- on hAppendLinkstoLanguage
- set Ltempsz to count(gTempLexicon)
- hPrepTempLang(gTempLangModel, Ltempsz, gTempLexicon)
- set gTempLexicon to []
- end
-
- on hPrepTempLexicon
- hLoadIndextoLexicon()
- end
-
- on hLoadIndextoLexicon
- set n to 1
- repeat while 1
- set Lw to line n of field gIndxScrollFldK
- if Lw = EMPTY then
- exit repeat
- end if
- add(gTempLexicon, Lw)
- set n to n + 1
- if n = 8 then
- exit repeat
- end if
- end repeat
- hAddLinkstoLanguage()
- set gTempLexicon to []
- end
-
- on hAddLinkstoLanguage
- if objectp(oASRObj) and (gMACListenStatus = 1) and (gTempLangModel <> 0) then
- hReportStatus("Updating speech recognizers...")
- if not objectp(gTempLexicon) then
- set Ltempsz to -1
- else
- set Ltempsz to count(gTempLexicon)
- end if
- if Ltempsz < 1 then
- return
- end if
- oASRObj(mClearLanguage, gTempLangModel)
- set gTempHyperlinks to EMPTY
- hPrepTempLang(gTempLangModel, Ltempsz, gTempLexicon)
- hReportStatus("Recognizers updated...")
- else
- end if
- end
-
- on hUploadTempLinksLang
- if objectp(oASRObj) then
- set gTempLangModel to oASRObj(mNewLanguage, "<TempLinks>")
- hPrepALanguage(gTempLangModel, 1, ["hello computer": "hReply #hello"])
- end if
- end
-